package com.xmut.mall.product.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xmut.mall.product.entity.SkuInfoEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xmut.mall.product.searchparam.ManagerSkuComponentsSearchParam;
import com.xmut.mall.product.searchparam.SkuComponentsSearchParam;
import com.xmut.mall.product.searchparam.SkuPageSearchParam;
import com.xmut.mall.product.vo.SkuPageVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * sku信息
 * 
 * @author 1912120131suntingxing
 * @email 1192081604@qq.com
 * @date 2022-07-14 00:45:33
 */
@Mapper
public interface SkuInfoDao extends BaseMapper<SkuInfoEntity> {

    /**
     * 获取sku的分页数据
     * @param initPage
     * @param searchParam
     * @return
     */
    IPage<SkuPageVo> getSkuPage(Page<Object> initPage,@Param("param") SkuPageSearchParam searchParam);

    /**
     * 获取sku选择组件的分页数据
     * @param initPage
     * @param param
     * @return
     */
    IPage<SkuInfoEntity> getSkuComponentsDataByPage(Page<Object> initPage,@Param("param") SkuComponentsSearchParam param);

    /**
     * 获取商城官方管理端的平台券所用的sku选择组件的分页数据
     * @param initPage
     * @param param
     * @return
     */
    IPage<SkuInfoEntity> getManagerSkuComponentsDataByPage(Page<Object> initPage,@Param("param") ManagerSkuComponentsSearchParam param);
}
